project( parnm )
cmake_minimum_required(VERSION 2.6)

cmake_policy( SET CMP0013 OLD )

find_package( OpenMP REQUIRED )

if( ${CMAKE_COMPILER_IS_GNUCXX} STREQUAL 1 )
  add_definitions( -Wall -Werror )
endif( ${CMAKE_COMPILER_IS_GNUCXX} STREQUAL 1 )

set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" )

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")

add_subdirectory( openmp ${CMAKE_CURRENT_SOURCE_DIR}/bin )
add_subdirectory( cuda ${CMAKE_CURRENT_SOURCE_DIR}/bin )
add_subdirectory( simple ${CMAKE_CURRENT_SOURCE_DIR}/bin )
add_subdirectory( mainCuda ${CMAKE_CURRENT_SOURCE_DIR}/bin )